package com.project.${pkgname}.domain.repository;

import com.project.${pkgname}.domain.entity.${className};
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author: ${createName}
 * @blame: ${name}Repository
 * @date: ${time}
 **/
public interface ${className}Repository extends JpaSpecificationExecutor<${className}>, JpaRepository<${className}, Long> {
    @Modifying
    @Transactional
    @Query(nativeQuery = true, value = "update ${tableName} set is_delete=1,update_by=:updateBy where id = :id")
    Integer delete(@Param("id") Long id, @Param("updateBy") Long updateBy);
}
